home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
4671-5.790
/
dmg-5333
/
tutorial
/
kit2game.txt
< prev
next >
Wrap
Text File
|
1995-08-10
|
14KB
|
317 lines
THE THIRD DIMENSION
3DKIT 2 TUTORIAL GAME FOR BEGINNERS: MISSION (IM)POSSIBLE
------------------------------------------------------------
PART 5
This issue we will add the necessary conditions to our Mission 1 area.
We are also going to add several animbrushes.
To refresh your memory:
----------------------
The purpose of this mission is to find 3 magnetic tablets to disable the
laser barriers. There are teleports that will transport the player quickly
from one place to another. Power crystals are hanging all over the place
that will give the player more power when shot. On the other hand, walking
too near to a laser barrier, the player will loose power.
I am now going to make several conditions and animbrushes for this Mission
and to immediately test the effects of it I load my area into the Mission
datafile and save it as 'Try.3wd'. When testing a datafile I try to have
it saved as "clean" as possible, i.e save it before testing anything.
Having experienced animations that didn't work correctly anymore after
testing once or twice (while saving the datafile inbetween) made me do this.
I admit, it is a bit more work, but I avoid a lot of frustration by doing
it in this way.
I make a condition for Procedure 1. This is icon 1 under the word Missions.
As I will let the player choose each mission at random, it is necessary
that the Power and Credits are updated each mission to their default
values. To still be able to add all the Credits earned during the missions,
I will have to reserve a variable which will count the number of missions
successfully played. When all 5 missions have been successfully played, a
message should appear on the screen and the number of credits should then
be 500. This variable will be used later on in the game. For now, here is
the condition for Procedure 1:
PC AMIGA/ATARI
SOUND (1) SOUND (4)
CLEARSCREEN DELAY (50)
LOADWORLD ("A:\\3DKIT2\\MISSION1.3WD") SETVAR (2000,V31)
SETVAR (0,V32)
UPDATEI (1)
UPDATEI (2)
GOTO (1,3)
On the Amiga/Atari this condition is almost the same as the first lines in
the Initial Condition. Added is the GOTO command to transport the player to
the correct area.
On the PC the LoadWorld command enables you to connect a complete datafile
to the existing one. The information of the existing datafile however will
be lost. But this doesn't matter because the same necessary conditions are
present in the connected datafile, because for each mission area I will
use the original datafile, including the Choice area with its conditions,
and add the relevant area to it. So we don't need to (re)set the variables
again because the Initial Condition will automatically perform this. In
order to be able to add all the credits earned during the different missions
there is one variable on the PC that doesn't reset when using the LoadWorld
command. This variable is the number 255. I will introduce this variable
when we have completed the creation of 2 missions.
A short explanation on the LoadWorld command:
When using this command on the PC, it is necessary to add 2 backslashes.
The first "\" is used as a control code. To get a true backslash you
must enter two into the string. See the above command.
(This information was given to me by Paul Gregory during playtesting
the PC Kit2 version.)
I have used the command to be executed on the disk in the a: drive. When
you copy the datafiles to your harddisk you have to change the command
using c:\\ instead of a:\\ and fill in the correct directory(ies) in which
the program can find your datafiles.
Before testing the above conditions, I save my datafile. After testing,
I 'CLEAR ALL' and load the 'clean' datafile (try.3wd) again.
I want to use two animbrushes. The first one will be used for the laser
barriers (sensors) and should appear as some sort of laserbeam. The second
one applies to all 5 missions and will be that of a dying soldier (when a
mission is not correctly completed).
To create an animbrush in Kit 2, I will first have to cut the brushes from
a previously made picture in my paint program. I use this picture both on
the Amiga and on the PC. On the Amiga the memory is not divided into two
chunks as is on the PC. Therefore I have enough memory to use all the
brushes of the soldier to create my animation. On the PC however my memory
for animbrushes is restricted to 16.340 bytes, so in order to make more
than one animation I will have to make a selection of the brushes. As I
will use a third one for another mission, I also must have some memory
left.
Some remarks about the PC memory chunks in comparison with the AMIGA/
ATARI:
To see the memory you have available on the PC, you click the down arrow to
the left of the words MODE in the Edit/Movement Window below
OBJECT the view window.
OBJPOS
Click until you see the words: Free Memory 1
Free Memory 2
System Memory
The first memory amount is used for creating your world (i.e. objects,
animations, conditions, etc). You can check how much memory is left
anytime (on the AMIGA/ATARI this memory is used for all actions in
Kit2 and it can even be made larger by increasing the Buffer size).
The second memory is used for cutting brushes and making brushanimations.
You can check how much of this memory you use when cutting your brushes
and making brushanimations.
The System Memory is the overall memory which has a connection with the
Conventional and Extended or Expanded memory of your PC. On the AMIGA it
is related to the Chip and RAM memory of AMIGA-DOS.
At a certain moment some actions cannot be performed anymore. For instance,
after editing a large condition text several times you suddenly cannot get
access to it anymore. The only solution is: save your datafile, quit the
program and load it in again. Sometimes the program locks up (for no reason
it seems). I think one reason might be that being a very complicated program
in itself (using a lot of memory-intensive mathematics) it only allows you
a limited amount of memory for yourself. So being aware of this it is
very important to save your work regularly.
Cutting brushes is described very clearly in the Manual, pages 35/36 as
is creating and making a brushanimation of it. There has also been an
article on this subject in issue 14 of our diskmag made by Tony. I have
placed this article on this disk again so it shouldn't be that difficult
now to make a brushanimation yourself. The brushanims are already
included into this month's datafile, but I also have placed the pictures on
the disk, so you can practise it yourself.
In order for the brushanims to work correctly I have to edit the Initial
Condition to make them invisible when the game is started.
I also need a variable to count the magnetic tablets the player has to
pick up. I pick V33 which will be set to zero in the Initial Condition.
I pick V35 as a timer variable to use in a General Condition when
showing the brushanimation of the soldier. This will also be set to zero
in the Initial Condition.
So at this moment I edit the Initial Condition as follows:
DISABLEBRUSHANIM (1)
DISABLEBRUSHANIM (2)
SETVAR (2000,V31)
SETVAR (0,V32)
UPDATEI (1)
UPDATEI (2)
SETVAR (0,V33)
SETVAR (0,V35)
I edit Procedure 6, which is connected to the sensors. In it I will let
the laserbeam brushanim appear and let the player loose Power.
PROCEDURE 6
PC AMIGA/ATARI
ENABLEBRUSHANIM (1) ENABLEBRUSHANIM (1)
STARTBRUSHANIM (1,105,85,2) STARTBRUSHANIM (1,105,95,2)
SOUND (3) SUBVAR (1,V31)
SUBVAR (50,V31)
The brushanimation will start at x-coordinate 105 and y-coordinate 85 or
95 in single mode on screen but it will repeat itself as long as the
sensor detects you. On the PC the sound is given in the Procedure, on the
Amiga/Atari the sound is defined in the sensor's attributes window. The
subvar condition is slightly different on the computers (I don't know why
but in this way they both work the same amount of time).
I create a General Condition (nr. 1), which is valid for all 5 missions and
will count the Power variable V31. When it is lower than zero the Soldier
brushanimation will start. In this condition I will use the variable V35
as a timer together with the WAIT NEXT command, because otherwise the
brushanim will go so fast that you hardly see it on screen. I will also
use another powerful command of Kit 2: the PSTRING command, which allows
you to let text appear on a x and y coordinate on screen. This command is
used together with the TEXTFONT and TEXTCOL(our) commands. I edit it as
follows:
GENERAL CONDITION 1
IF VARLT? (V31,0)
THEN
SOUND (17)
GOTO (1,1)
DISABLEBRUSHANIM (1)
FOR (V35,0,10)
WAIT
NEXT
ENABLEBRUSHANIM (2)
STARTBRUSHANIM (2,120,90,2)
FOR (V35,0,2000)
WAIT
NEXT
TEXTFONT (1)
TEXTCOL (7,2)
PSTRING ("ALAS ..... YOU DIE .....",100,130)
SOUND (17)
DELAY (250) (Amiga/Atari: DELAY (150))
DISABLEBRUSHANIM (2)
ENDGAME
ENDIF
There are also some conditions to make in the mission 1 area itself. I
already made one object condition on the Power Crystals. I have to
make another object condition on the Magnetic Tablets to add credits
to variable 32 when picked up and to add 1 number to variable V33
until it reaches the number 3 when all three tablets have been picked
up:
IF ACTIVATED?
THEN INVIS (35)
ADDVAR (25,V32)
ADDVAR (1,V33)
SOUND (19)
ENDIF
One advantage in Kit2 is that you can save all your condition text files
and load them into another condition when it has to contain the same
contents.
In this case I need the above condition 3 times, so this comes in handy.
I have two other tablets, nr. 40 and 47, so when I load the condition
again, I have to change the number behind INVIS in line 2 into (40)
resp. (47). In order to let the player gain 100 credits, I will change
the addvar command in line 3 to (50,V32) when tablet nr. 47 is picked up.
When all 3 tablets have been picked up, variable 33 will read (V33,3). At
that time all the laser barriers are to be disabled and the invisible
exits should become visible. To accomplish this I will make use of a
Local Condition (this condition is only valid in the area it has been
created in). I create Local Condition nr. 1 and edit it as follows:
IF VAREQ? (V33,3)
THEN
DESTROY (52)
DESTROY (55)
DESTROY (57)
DESTROY (58)
DESTROY (59)
DESTROY (61)
DESTROY (67)
DESTROY (74)
DESTROY (76)
DESTROY (78)
DESTROY (79)
DESTROY (80)
DESTROY (82)
DESTROY (85)
VIS (51)
VIS (56)
VIS (60)
VIS (73)
VIS (77)
ENDIF
When this condition takes effect, the 5 exits in the area will be visible.
They also need a condition to tell the player that the mission is success-
fully completed and to transport him/her back to the Choice Area. This
condition is as follows:
IF COLLIDED?
THEN
SOUND (6)
DELAY (50)
GOTO (1,1)
TEXTFONT (1)
TEXTCOL (7,2)
PSTRING ("LEVEL COMPLETED",60,100)
SOUND (9)
DELAY (250)
DESTROY (51,3) exit1 in area 3
DESTROY (56,3) " 2 "
DESTROY (60,3) " 3 "
DESTROY (73,3) " 4 "
DESTROY (77,3) " 5 "
GOTO (1,2)
ENDIF
I save this condition and load it into the conditions for the other 4
exits.
NOTE:
You may wonder why there are 5 exits in the area. Once the tablets
are picked up there will (probably, not always) at least 1 be visible right
where the player stands. The only thing he/she has to do is collide with it
to complete the mission. However, the player can still walk through the maze
and shoot the power crystals to gain more power and exit through another
Entrance. This gives the possibility of adding a sort of bonus level to this
mission. I didn't do this in this tutorial but it might be an idea to try out
for yourself to add something personal to this game. It could also be possible
to change the condition for the different exits so each of them gives
access to another mission in the game. These are just some ideas that show
you how this game could also be made.
There is still one thing I have to do before the whole area is ready:
I will turn the Teleports into Transporters. I click on the attributes
icon below the Edit Window and choose Teleport 2. I click on TRN and
then on TRANSPORTER. Another window pops up in which you can fill in
the Area and the Entrance to be transported to. This will be:
for Teleport 2 Area 3 Entrance 5
for Teleport 3 Area 3 Entrance 6
for Teleport 4 Area 3 Entrance 2
for Teleport 5 Area 3 Entrance 3
for Teleport 6 Area 3 Entrance 4
I want to hear a sound when teleported so I also make a condition for
the Teleports:
sound (6)
delay (50)
I save this condition and load it into the condition for each Teleport.
I save the datafile (still as Test.3wd) and now I can really playtest it.
When everything works correctly and I am really convinced of that myself,
I clear the screen, load in the datafile again and save it as Missiona.3wd
(AMIGA/ATARI) and Mission1.3wd (PC).
You now have a small game in itself that you can play and next issue we are
going to create another mission.
Happy computing!
Mieke